# coding=UTF-8
a=input("请输入第一个数\n");
b=input("请输入第二个数\n");
c=input("请输入第三个数\n");

max=(a>b and a or b)>c and (a>b and a or b) or c;
min=(a<b and a or b)<c and (a<b and a or b) or c;
mid=a+b+c-max-min;
print"最大数为",max,"中间数为",mid,"最小数为",min;